{% extends 'base.html' %}

{% load i18n %}
{% load custom_url_tags %}
{% load custom_translation %}

{% block title %}
{% if not run %}
{% trans "KataGo - Games" %}
{% else %}
{% blocktrans with run_name=run.name %} KataGo - Games for {{run_name}} {% endblocktrans %}
{% endif %}
{% endblock %}


{% block content %}
{% if run %}

<h1 class="title">{% blocktrans with run_name=run.name %}Games for {{run_name}} by Network{% endblocktrans %}</h1>

{% url 'networks' current_run.name as current_url %}
{% url 'runs' as older_url %}
{% include 'handle_multiple_runs.html' %}

{% blocktrans %}
<p>
View the games that a particular network has played in training or in rating matches against other networks:
{% endblocktrans %}


<table class="table mt-3">
  <tr>
    <th> {% trans "Network" %} <i class="fas fa-info-circle" tabindex="-1" title="{% trans "b = number of blocks, c = number of channels, s = number of training sample steps, d = latest data rows in the run this net trained on" %}"></i> </th>
    <th class="has-text-right"> {% trans "Training Games" %} </th>
    <th class="has-text-right"> {% trans "Rating Games" %} </th>
  </tr>
  {% for group in group_list %}
  <tr>
    <td> {{ group.network_name }} </td>
    <td class="has-text-right"> <a href="{% training_games_list_by_network run.name group.network_name %}"> {{ group.total_num_training_games|as_n_training_games_str }} </td>
    <td class="has-text-right"> <a href="{% rating_games_list_by_network run.name group.network_name %}"> {{ group.total_num_rating_games|as_n_rating_games_str }} </td>
  </tr>
  {% endfor %}
</table>


{% endif %}
{% endblock content %}
